import java.util.*;


public class LRUCache {
    public static void main(String[] args) {
      LRUCache l=new LRUCache();
        f f = l.new f();
        f f1 = l.new f();
        new Thread(new Runnable() {
           @Override
           public void run() {
               try {
                   f.ff();
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
           }
       }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    f1.ff();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }
    public class f{
        public synchronized void ff() throws InterruptedException {
            System.out.println(111);
            Thread.sleep(1000);
            System.out.println(2);
        }
    }
}